/*
============================================================================
FileName	:	XQChatRosterScene.h
Author		:	liyake
Website		:	http://www.liyake.com
Create Data	:	2012-03-17 13:47
Change Data	:	2012-03-17 13:47 by liyake
Detail		:	The socket client of xqchat application
============================================================================
*/
#ifndef _XQCHAT_ROSTER_SCENE_H_
#define _XQCHAT_ROSTER_SCENE_H_

#include <QGraphicsScene>
#include "XQChatRosterGroup.h"
#include "XQChatRosterNode.h"

namespace XQChat
{
	class CXQChatRosterScene : public QGraphicsScene
	{
		Q_OBJECT
	public:
		CXQChatRosterScene(QObject * parent = 0);
		~CXQChatRosterScene(void);
	public:
		void updateRoster(CXQChatRoster* pRoster);

	private:
		CXQChatRosterGroup* addRosterGroupIfDontExist(const QString& group);

	private:
		QMap<QString, CXQChatRosterGroup*> m_mapRosterGroup;
		CXQChatRosterScene* m_pScene;
		CXQChatRosterGroup* m_pGroup;
	};
}

#endif //_XQCHAT_ROSTER_SCENE_H_